package servlet;

import bean.back.createpark.BackCreateparkBean;
import util.DealParams;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;

@WebServlet("/back/createpark")
public class BackCreateParkServlet extends HttpServlet{
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("utf-8");
        Map<String,String> params = DealParams.getParamsMap(req);
        String id = params.get("id");
        String token = params.get("token");
        String tel= params.get("tel");
        //String nums = params.get("nums");
        //String price= params.get("price");
        String address= params.get("address");
        //String image= params.get("image");
        //String introduction= params.get("introduction");
        String name= params.get("name");
        PrintWriter out = resp.getWriter();
        BackCreateparkBean bean = new BackCreateparkBean();
        out.print(bean.create(id,token,tel,"45","5元1小时",address,"","",name));
    }
}
